<!DOCTYPE html>
    <body>
        <script>
        let addfunc;
        function loadWebAssembly(fileName) {
        return fetch(fileName)
            .then(response => response.arrayBuffer())
            .then(bits => WebAssembly.compile(bits))
            .then(module => { return new WebAssembly.Instance(module) });
        };
        
        loadWebAssembly('./build/optimized.wasm')
        .then(instance => {
            addfunc = instance.exports.add;
            console.log('Finished compiling! Ready when you are...');
        });
        </script>
    </body>
</html>